package com.zeei.ems.base.security.bo;

import com.zeei.ems.base.vo.UserVO;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;


public class SessionUserInfo extends User {

    private UserVO basUser;

    public SessionUserInfo(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public SessionUserInfo(String username, String password, Collection<? extends GrantedAuthority> authorities, UserVO basUser) {
        super(username, password, authorities);
        this.basUser = basUser;
    }

    public SessionUserInfo(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
    }

    public UserVO getUser() {
        return basUser;
    }
}
